<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<div>我是location对象</div>
		<script>
			var demo = 1;
			alert("我要跳转了");
			// location.href = "https://www.baidu.com";
			// 主要是用来跳转页面的
			// 这个玩法比较多
			setTimeout(() => {
				location.href = "https://www.baidu.com";
			}, 2000);
		</script>
	</body>
</html>
